package com.goldenKey.common.pojo.enumeration;

/**
 * 图书借阅通过状态
 */
public enum PassStatusEnum {

    WITHOUT_CHECK(1, "无需审核"),
    CHECKING(2, "审核中"),
    PASSED(3, "已通过"),
    NO_PASS(-1, "未通过");



    private Integer status;
    private String desc;

    PassStatusEnum(int status, String desc) {
        this.status = status;
        this.desc = desc;
    }

    public static PassStatusEnum getByStatus(Integer status) {
        for(PassStatusEnum item : PassStatusEnum.values()) {
            if(item.getStatus().equals(status)) {
                return item;
            }
        }
        return null;
    }

    public Integer getStatus() {
        return this.status;
    }
    public String getDesc() {
        return this.desc;
    }
}
